﻿using System;
namespace LitTools
{
    /// <summary>
    /// 软引导
    /// </summary>
    public class TutorialItem_Soft : TutorialItem_Common
    {
        public Func<bool> CheckFunc;

        /// <summary>
        /// 显示引导检查
        /// </summary>
        /// <returns></returns>
        public bool ShowTutorialCheck()
        {
            if (CheckFunc == null)
                return false;
            return CheckFunc.Invoke();
        }

        public override void OnUpdate()
        {
            if (!ShowTutorialCheck())
            {
                //关闭引导
                TutorialManager.Instance.HideTutorial(id);
            }
        }
    }
}